package org.online.test;

import org.online.dao.ProductDao;
import org.online.dao.impl.ProductDaoImpl;
import org.online.entity.Product;

import java.util.List;

public class MainTest04 {
    public static void main(String[] args) {
        ProductDao productDao = new ProductDaoImpl();

        //1.查询所有
        //List<Product> list = productDao.selectAll();
        //for(Product p : list) {
        //    System.out.println(p);
        //}

        //2.删除
        // productDao.delete("170");

        //3.修改
        /*
        Product p = new Product();
        p.setId("10000");
        p.setName("11");
        p.setPrice(11);
        p.setCount(11);
        p.setDesc("11");
        p.setImage("1111.png");

        int update = productDao.update(p);
        System.out.println(update);
        */


        //4.修改数量
        int update = productDao.updateCount("10000",10000);
        System.out.println(update);
    }
}
